<?php
if(!empty($_GET["decode"]))
    {
        $de = $_GET["decode"];
        $de = rtrim($de, '/');
        $de = explode('/', $de);
    }
    //$cat_id_get['cat_id'];
$cat_p = isset($_GET['catid'])?$_GET['catid']:$seller_cat;
$owner = isset($_GET['owner'])?$_GET['owner']:$seller_id;

if($pageURL!=$homepage)
{
if(!empty($_GET['catid']))    
{
    $catid = $_GET['catid'];
}
 else 
    {
        $catid = '';
    }     
    ?>
    <div class="broswer bo_ddd radius5">
    <div class="title">Browse</div>
    <?php 
    $sql_name = "SELECT category_name FROM tblcategory WHERE id = $cat_p";
    $result_name = mysql_query($sql_name);
    $row_name = mysql_fetch_assoc($result_name);
    
    $sql = "SELECT * FROM tblcategory WHERE parent_id = $cat_p AND status = 1 ORDER BY ordering";
    $result = mysql_query($sql);
    ?> 
    <?php 
    if($cat_p==1)
    {
    ?>
    <ul class="sidemenu">

    <?php
    	$sql = "SELECT * FROM tblcategory WHERE parent_id = 0 AND status = 1 ORDER BY ordering";
				$result = mysql_query($sql);
				$i = 1;
				while($row = mysql_fetch_assoc($result)){
					if($i ==1){
					echo '';	
					}else{
				?> 
					<?php
					}
					?>
					<li><a href="<?php echo W_ROOT.'/'.$seller.''.$catid;?>/product?cat_p=<?php echo $row['id']?>"><?php echo $row['category_name']?></a> <span class="line"></span>
					<?php
					$i++;
				}
		?></li>
    </ul>
    <?php
    } 
?> 


<ul class="sidemenu">
<b style="margin-left: 5px;"><?php echo $row_name['category_name']?></b>
<?php
while($row=mysql_fetch_assoc($result)){
?>
<li><a href="<?php echo W_ROOT;?>/company/allpro/?owner=<?php echo $owner;?>&cat_p=<?php echo $row['id']?>"><?php echo $row['category_name']?></a></li>

<?php
}
// end while
?>
</ul>
</div>
<?php

}

if (isset($de[1])|| isset($owner))
{
    include(S_ROOT.'/company/appearance_products/advance_search.php');
    include(S_ROOT.'/product/appearance_products/products_color.php');
    include(S_ROOT.'/product/appearance_products/products_size.php');
    include(S_ROOT.'/product/appearance_products/product_brand.php');
}
?>